using UnityEngine;
using System.Collections;

public class GarbageCollector : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnTriggerEnter(Collider other)
	{
		if(other.gameObject.tag == "Floor")
		{
			Destroy(other.gameObject);
			InstantiatePlatform.numPlatforms--;
		}
		if(other.gameObject.tag == "Floor" && other.name == "Box(Clone)")
		{
			Destroy(other.gameObject);
			InstanciarCaixas.caixas --;
			InstanciarCaixas.timer = 0;
		}
	}
}
